const fs = require('fs');
const path = require('path');


let p_all_json_data = path.resolve(__dirname, "../", "public", "allData", "寂照庵")
let p_2 = path.resolve(__dirname, "../", "public", "allData")

let files = fs.readdirSync(p_all_json_data)

let res_json = files.map(item => {
    let t = item.replace(".json", "")
    let name = t.replace(".json", "").replace("_", "-").replace("_", "-")
    let json_path = t
    
    return {
        name,
        json_path
    }
})

console.log("🚀 ~ file: test.js ~ line 12 ~ res_json", res_json)

